/*
 * @Author: your name
 * @Date: 2022-03-29 17:54:32
 * @LastEditTime: 2022-04-07 11:11:38
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \erp_background_system\src\router\documentaryRouter.js
 */

import { Suspense, lazy } from 'react';
//路由懒加载的封装
const lazyComponent = (path) => {
  const LazyComp = lazy(() => import(`./../${path}`))
  return <Suspense fallback={<div>Loading...</div>}>
    <LazyComp />
  </Suspense>
}

const documentaryRouter = [
  {
    path: '/followOrder',
    title: '跟单管理',
    children: [
      {
        path: '/followOrder/followOrderList',
        title: '跟单列表',
        element: lazyComponent('views/FollowOrderManage/FollowOrderManage.jsx')
      },
      {
        path: '/followOrder/addfollowOrder',
        title: '添加跟单',
        element: lazyComponent('views/FollowOrderManage/AddFollowOrderComm/AddFollowOrderComm.jsx'),
      }, {
        path: '/followOrder/modifyfollow',
        title: '修改跟单',
        element: lazyComponent('views/FollowOrderManage/ModifyFollow/ModifyFollow.jsx'),
        pagepermisson: true
      },
      {
        path: '/followOrder/fillfollowOrder',
        title: '填写跟单',
        element: lazyComponent('views/FollowOrderManage/FillFollowOrder/FillFollowOrder.jsx'),
        pagepermisson: true
      }
    ]
  }
]
export default documentaryRouter